
// To implement a 3D tranformation on any object 


#ifndef OBJECT3DTRANSFORMATION_H
#define OBJECT3DTRANSFORMATION_H

#include "Matrix.h"
#include <math.h>

using namespace std;



class Object3DTransformation : public Matrix{

public:
   Matrix * transformedObject; 
   //Matrix * transformedBy;
   enum Axis { x_axis = 1 , y_axis ,z_axis};
   
public:   
   Object3DTransformation(const char *fileName);   
   Object3DTransformation(const Object3DTransformation & another);
   Object3DTransformation(long numRows ,long numCols,double val=0); 
   Object3DTransformation(); 
   
   ~Object3DTransformation();
   

  //  void setTransformedByMatrix(const Matrix & T);   
    
    
   // Tranformation of object thru x-axis , y-axis  and z-axis
       Matrix transform(const Matrix & T);
      
   // Translation in x y z direction by dx,dy and dz units
       Matrix transform(const double dx = 0 , const double dy = 0, const double dz = 0);
       
    
   // Rotation of object thru x ,y  or z axis
       Matrix rotate(double angle ,char rotationDirection);     // Axis rotationDirection = y_axis);
       
   // Returns the rotaion matrix    
       Matrix getRotationMatrix(double angle ,char rotationDirection);
    
   // Scaling of object thru x and y axis
   //not working
    Matrix scale(const Matrix & T); // incomplete
    
    Matrix scale(const double dx = 1, const double dy = 1,const double dz = 1);
    
    
   // Shearing of object thru x and y axis
   // not working
    Matrix sheare(const Matrix & A);   // incomplete 
    
    // NOT WORKING
    // WE NEEED TO PROJECT SO PENDING 
    Matrix sheare(const double dx ,const double dy = 0,const double dz = 0);
    
   // save transformed object into file
    bool save(const char *fileName);   
    
   //return transformed object 
    Matrix getTransformedObject(); 
   
};

#endif     // end of Object3DTransformation_H



